#include <QCoreApplication>
#include "myconfig.h"
#include "myservergateway.h"
#include "myserverclient.h"
#include "mysql.h"
#include "myjournal.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    MyJournal::getObject()
            ->printJournal("系统开始启动！");
    MyConfig::init();   //配置文件模块初始化
    MyJournal::getObject()
            ->printJournal("配置文件加载完毕");
    MySql::getObject();
    MyJournal::getObject()
            ->printJournal("数据库启动完毕！");
    MyServerGateway::getObject()
            ->startNet(MyConfig::getNetGateWayPort());
    MyServerClient::getObject()
            ->startNet(MyConfig::getNetClientPort());
    MyJournal::getObject()
            ->printJournal("网络服务启动完毕！");
    return a.exec();
}
